<template>
  <div class="app-container">
    <el-card class="box-card">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">

      <el-form-item label="印章编号" prop="sealNumber">
        <el-input
          style="width: 200px"
          v-model="queryParams.sealNumber"
          placeholder="请输入印章编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="印章名称" prop="note1">
        <el-input
          style="width: 200px"
          v-model="queryParams.note1"
          placeholder="请输入印章名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="姓名" prop="username">
        <el-input
          style="width: 200px"
          v-model="queryParams.username"
          placeholder="请输入申请人姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item label="身份证号" prop="idNumber">
        <el-input
          style="width: 200px"
          v-model="queryParams.idNumber"
          placeholder="请输入申请人身份证号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>


<!--      <el-form-item label="发放日期" prop="releaseDate" v-show="showSearch">
        <el-date-picker clearable
                        style="width: 200px"
                        v-model="queryParams.releaseDate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="请输入发放日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="启用日期" prop="commissioningDate" v-show="showSearch">
        <el-date-picker clearable
                        style="width: 200px"
                        v-model="queryParams.commissioningDate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="请输入启用日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="停用日期" prop="closeDate" v-show="showSearch">
        <el-date-picker clearable
                        style="width: 200px"
                        v-model="queryParams.closeDate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="请输入停用日期">
        </el-date-picker>
      </el-form-item>
        <el-form-item label="注销日期" prop="closeDate" v-show="showSearch">
          <el-date-picker clearable
                          style="width: 200px"
                          v-model="queryParams.disableDate"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请输入注销日期">
          </el-date-picker>
        </el-form-item>-->
      <el-form-item label="发放状态" prop="releaseStatus" v-show="showSearch">
        <el-select
          style="width: 98%"
          v-model="queryParams.releaseStatus"
          placeholder="请选择发放状态"
          clearable
        >
          <el-option
            v-for="dict in dict.type.yh_release_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>







<!--      <el-form-item label="创建者" prop="createBy">
        <el-input
          v-model="queryParams.createBy"
          placeholder="请输入创建者"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="创建时间" prop="createTime">
        <el-date-picker clearable
          v-model="queryParams.createTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择创建时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="更新者" prop="updateBy">
        <el-input
          v-model="queryParams.updateBy"
          placeholder="请输入更新者"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="更新时间" prop="updateTime">
        <el-date-picker clearable
          v-model="queryParams.updateTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择更新时间">
        </el-date-picker>
      </el-form-item>-->
      <br/>
      <div style="text-align: right;">
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </div>
      <br/>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['dr:mana:add']"
        >新增</el-button>
      </el-col>
<!--      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['dr:mana:edit']"
        >修改</el-button>
      </el-col>-->
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['dr:mana:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['dr:mana:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-share"
          size="mini"
          @click="addQuestion"
        >军检印章</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="manaList" border @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column
        v-if="columns[0].visible"
        label="序号"
        type="index"
        width="50"
        align="center">
        <template scope="scope">
          <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
        </template>
      </el-table-column>
<!--      <el-table-column label="ID" align="center" prop="id" v-if="columns[0].visible"/>-->
      <el-table-column label="姓名" align="center" prop="username" v-if="columns[1].visible"/>
      <el-table-column label="印章编号" align="center" prop="sealNumber" v-if="columns[4].visible"/>
      <el-table-column label="印章名称" align="center" prop="note1" v-if="columns[2].visible"/>
      <el-table-column label="身份证号" align="center" prop="idNumber" v-if="columns[3].visible"/>
      <el-table-column label="发放日期" align="center" prop="releaseDate" v-if="columns[5].visible"/>
      <el-table-column label="启用日期" align="center" prop="commissioningDate" v-if="columns[6].visible"/>
      <el-table-column label="停用日期" align="center" prop="closeDate" v-if="columns[7].visible"/>
      <el-table-column label="注销日期" align="center" prop="disableDate" v-if="columns[8].visible"/>
      <el-table-column label="发放状态" align="center" prop="releaseStatus" v-if="columns[9].visible">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.yh_release_status" :value="scope.row.releaseStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="管理人员姓名" align="center" prop="managerName" v-if="columns[10].visible"/>
      <el-table-column label="管理人员身份证号" align="center" prop="managerIdNumber" v-if="columns[11].visible"/>
     <el-table-column label="创建者" align="center" prop="createBy" v-if="columns[12].visible"/>
      <el-table-column label="创建时间" align="center" prop="createTime" width="180"v-if="columns[13].visible">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="更新者" align="center" prop="updateBy"v-if="columns[14].visible" />
      <el-table-column label="更新时间" align="center" prop="updateTime" width="180"v-if="columns[5].visible">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remark" v-if="columns[16].visible"/>
<!--      <el-table-column label="备注1" align="center" prop="note1" />
      <el-table-column label="备注2" align="center" prop="note2" />
      <el-table-column label="备注3" align="center" prop="note3" />
      <el-table-column label="备注4" align="center" prop="note4" />
      <el-table-column label="备注5" align="center" prop="note5" />
      <el-table-column label="备注6" align="center" prop="note6" />
      <el-table-column label="备注7" align="center" prop="note7" />
      <el-table-column label="备注8" align="center" prop="note8" />
      <el-table-column label="备注9" align="center" prop="note9" />
      <el-table-column label="备注10" align="center" prop="note10" />-->
      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['dr:mana:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            @click="handleDelete(scope.row)"
            v-hasPermi="['dr:mana:remove']"
          >删除</el-button>
          <el-button
            size="mini"
            type="text"
            @click="handleView(scope.row)"
            v-hasPermi="['dr:mana:query']"
          >详情</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    </el-card>
    <!-- 添加或修改印章管理对话框 -->
    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="1200px" append-to-body>
      <el-form label-position="right" ref="form" :model="form" Content-Type: :rules="rules"  label-width="150px">
        <el-container>
          <el-header>
            <el-divider content-position="left">
              <p style="color: #00afff; font-size: 18px;">人员信息</p>
            </el-divider>
          </el-header>
            <el-main>
              <el-col :span="12" >

                <el-form-item label="申请人姓名"prop="username">
                  <el-autocomplete
                    style="width: 100%"
                    placeholder="请输入申请人姓名"
                    v-model="form.username"
                    :fetch-suggestions="querySearchAsync"
                    @select="handleSelect"
                  >
                  </el-autocomplete>
                </el-form-item>
                <el-form-item label="管理人员姓名" prop="managerName">
                  <el-autocomplete
                    style="width: 100%"
                    placeholder="请输入管理人员姓名"
                    v-model="form.managerName"
                    :fetch-suggestions="querySearchAsync1"
                    @select="handleSelect1"
                  >
                  </el-autocomplete>
                </el-form-item>
<!--                <el-form-item label="证件编号" prop="certificateId">
                  <el-input v-model="form.certificateId" placeholder="请输入证件编号" style="width: 100%" />
                </el-form-item>-->

              </el-col>


          <el-col :span="12" >
            <el-form-item label="申请人身份证号" prop="idNumber">
              <el-input v-model="form.idNumber" placeholder="请输入申请人身份证号" style="width: 100%"/>
            </el-form-item>

            <el-form-item label="管理人员身份证号" prop="managerIdNumber">
              <el-input v-model="form.managerIdNumber" placeholder="请输入管理人员身份证号"style="width: 100%"/>
            </el-form-item>
          </el-col>
            </el-main>
          <el-header>
            <el-divider content-position="left">
              <p style="color: #00afff; font-size: 18px;">印章信息</p>
            </el-divider>
          </el-header>
          <el-main>
            <el-col :span="12" >
              <el-form-item label="印章编号" prop="sealNumber">
                <el-autocomplete
                  style="width: 100%"
                  placeholder="请输入印章编号"
                  v-model="form.sealNumber"
                  :fetch-suggestions="querySearchAsync2"
                  @select="handleSelect2"
                >
                </el-autocomplete>
              </el-form-item>
            </el-col>
            <el-col :span="12" >
              <el-form-item label="印章名称" prop="note1">
                <el-input v-model="form.note1" placeholder="请输入印章编号" style="width: 100%"/>
              </el-form-item>
            </el-col>
            <el-col :span="12" >
                <el-form-item label="发放状态" prop="releaseStatus">
                  <el-select
                    style="width: 100%"
                    v-model="form.releaseStatus"
                    placeholder="请选择发放状态"
                    clearable
                  >
                    <el-option
                      v-for="dict in dict.type.yh_release_status"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    />
                  </el-select>
                </el-form-item>
            </el-col>
            <el-col :span="12" >
        <el-form-item label="发放日期" prop="releaseDate">
          <el-date-picker clearable
                          v-model="form.releaseDate"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请选择发放日期"
                          style="width: 100%">
          </el-date-picker>
        </el-form-item>
            </el-col>
            <el-col :span="12" >
          <el-form-item label="注销日期" prop="disableDate">
            <el-date-picker clearable
                            v-model="form.disableDate"
                            type="date"
                            value-format="yyyy-MM-dd"
                            placeholder="请选择注销日期"
                            style="width: 100%">
            </el-date-picker>
          </el-form-item>
            </el-col>

            <el-col :span="12" >

        <el-form-item label="启用日期" prop="commissioningDate">
          <el-date-picker clearable
                          v-model="form.commissioningDate"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请选择启用日期"
                          style="width: 100%">
          </el-date-picker>
        </el-form-item>
            </el-col>
            <el-col :span="12" >
        <el-form-item label="停用日期" prop="closeDate">
          <el-date-picker clearable
                          v-model="form.closeDate"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请选择停用日期"
                          style="width: 100%">
          </el-date-picker>
        </el-form-item>

            </el-col>
            <el-col :span="24">
              <el-form-item label="备注" prop="remark">
                <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" style="width: 100%"/>
              </el-form-item>
            </el-col>
          </el-main>
        </el-container>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<style>
.ql-toolbar.ql-snow {
  text-align: left;
  border: 1px solid #ccc;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  padding: 8px;
  /* float: none; */
}
.el-header, .el-footer {
  background-color: #FFFFFF;
  color: #333;
  text-align: left;
  line-height: 60px;
  font-style: oblique;

}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #FFFFFF;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

/*对话框标题样式*/
.el-dialog__title{
  /*color: #1ab394;*/
  font-weight: bold;
  font-size: 25px;
}
</style>
<script>
import { listMana, getMana, delMana, addMana, updateMana } from "@/api/module/dr/mana";
import watermark from "watermark-dom";
import {listBaseinfo} from "@/api/module/dr/baseinfo";
import {listInfo1} from "@/api/module/dr/info";
export default {
  name: "Mana",
  dicts:['yh_release_status'],
  mounted() {

    // 加载水印
    const username = this.$store.state.user.name;
    watermark.load({ watermark_txt: "  "   });
  },
  data() {

    return {
      // 关闭按钮
      close() {
        this.open1 = false;
      },
      columns: [
        { key: 0, label: `id`, visible: true },
        { key: 1, label: `姓名`, visible: true },
        { key: 2, label: `印章名称`, visible: true },
        { key: 3, label: `身份证号`, visible: true },
        { key: 4, label: `印章编号`, visible: true },
        { key: 5, label: `发放日期`, visible: false },
        { key: 6, label: `启用日期`, visible: false },
        { key: 7, label: `停用日期`, visible: false },
        { key: 8, label: `注销日期`, visible: false },
        { key: 9, label: `发放状态`, visible: true },
        { key: 10, label: `管理人员姓名`, visible: false },
        { key: 11, label: `管理人员身份证号`, visible: false },
        { key: 12, label: `创建者`, visible: false },
        { key: 13, label: `创建时间`, visible: false },
        { key: 14, label: `更新者`, visible: false },
        { key: 15, label: `更新时间`, visible: false },
        { key: 16, label: `备注`, visible: true }
      ],
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      idNumbers:[],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: false,
      // 总条数
      total: 0,
      // 印章管理表格数据
      manaList: [],
      baseInfoList: [],
      InfoList: [],
      // 弹出层标题
      title: "",
      title1: "",
      // 是否显示弹出层
      open: false,
      open1: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        username: null,
        certificateId: null,
        idNumber: null,
        sealNumber: null,
        releaseDate: null,
        commissioningDate: null,
        closeDate: null,
        disableDate: null,
        releaseStatus: null,
        managerName: null,
        managerIdNumber: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
        note1: null,
        note2: null,
        note3: null,
        note4: null,
        note5: null,
        note6: null,
        note7: null,
        note8: null,
        note9: null,
        note10: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        username: [
          {required: true,message: "申请人姓名不能为空",trigger: "blur"}
        ],
        idNumber: [
          {required: true,message: "申请人身份证号不能为空",trigger: "blur"}
        ],
        sealNumber: [
          {required: true,message: "印章编号不能为空",trigger: "blur"}
        ],
       /* releaseStatus: [
          {required: true,message: "发放状态不能为空",trigger: "blur"}
        ],*/
       managerName: [
          {required: true,message: "管理人员姓名不能为空",trigger: "blur"}
        ],
        managerIdNumber: [
          {required: true,message: "管理人员身份证号不能为空",trigger: "blur"}
        ],
      }
    };
  },
  created() {
    this.getList();
    this.getBaseInfo();
    this.getInfo();
  },
  methods: {
    //下拉列表获取所有用户基本信息
    getBaseInfo() {
      listBaseinfo().then(response => {
        this.baseInfoList = response.rows;
        console.log('baseInfoList '+this.baseInfoList)
      });
    },
    //
    getInfo() {
      listInfo1().then(response => {
        this.InfoList = response.rows;

      });
    },
    //queryString 为在框中输入的值
    //cb 回调函数，将处理好的数据推回
    querySearchAsync2(queryString, cb) {
      let InfoJson= JSON.parse(JSON.stringify(this.InfoList).replace(/sealNumber/g,"value"));
      let results = queryString ? InfoJson.filter(this.createStateFilter(queryString)) : InfoJson;
      clearTimeout(this.timeout);
      this.timeout = setTimeout(() => {
        cb(results);
      }, 0.5*1000);
    },
    //根据输入的字段进行筛选
    createStateFilter2(queryString) {
      return (state) => {
        return (state.value.toString().toLowerCase().indexOf(queryString.toLowerCase()) === 0);
      };
    },

    //将其他数据自动补全，采用覆盖的方法
    handleSelect2(item){
      this.form.sealNumber = item.value;

    },


    //queryString 为在框中输入的值
    //cb 回调函数，将处理好的数据推回
    querySearchAsync(queryString, cb) {
      let baseInfoJson= JSON.parse(JSON.stringify(this.baseInfoList).replace(/username/g,"value"));
      console.log('baseInfoJson '+baseInfoJson)
      let results = queryString ? baseInfoJson.filter(this.createStateFilter(queryString)) : baseInfoJson;
      console.log('results '+results)
      clearTimeout(this.timeout);
      this.timeout = setTimeout(() => {
        cb(results);
      }, 0.5*1000);
    },
    //根据输入的字段进行筛选
    createStateFilter(queryString) {
      return (state) => {
        return (state.value.toString().toLowerCase().indexOf(queryString.toLowerCase()) === 0);
      };
    },

    //将其他数据自动补全，采用覆盖的方法
    handleSelect(item){
      this.form.username = item.value;
      this.form.idNumber=item.idNumber;
      this.form.certificateId=item.certificateId;

    },
    //queryString 为在框中输入的值
    //cb 回调函数，将处理好的数据推回
    querySearchAsync1(queryString, cb) {
      let baseInfoJson= JSON.parse(JSON.stringify(this.baseInfoList).replace(/username/g,"value"));
      console.log('baseInfoJson '+baseInfoJson)
      let results = queryString ? baseInfoJson.filter(this.createStateFilter1(queryString)) : baseInfoJson;
      console.log('results '+results)
      clearTimeout(this.timeout);
      this.timeout = setTimeout(() => {
        cb(results);
      }, 0.5*1000);
    },
    //根据输入的字段进行筛选
    createStateFilter1(queryString) {
      return (state) => {
        return (state.value.toString().toLowerCase().indexOf(queryString.toLowerCase()) === 0);
      };
    },

    //将其他数据自动补全，采用覆盖的方法
    handleSelect1(item){
      this.form.managerName = item.value;
      this.form.managerIdNumber=item.idNumber;
    },
    /** 查询印章管理列表 */
    getList() {
      this.loading = true;
      listMana(this.queryParams).then(response => {
        this.manaList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        username: null,
        certificateId: null,
        idNumber: null,
        sealNumber: null,
        releaseDate: null,
        commissioningDate: null,
        closeDate: null,
        disableDate: null,
        releaseStatus: null,
        managerName: null,
        managerIdNumber: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
        note1: null,
        note2: null,
        note3: null,
        note4: null,
        note5: null,
        note6: null,
        note7: null,
        note8: null,
        note9: null,
        note10: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.idNumbers = selection.map(item => item.idNumber)
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加印章管理";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getMana(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改印章管理";
      });
    },
    /** 详情按钮操作 */
    handleView(row) {
    /*  const id = row.id || this.ids
      getMana(id).then(response => {
        this.form = response.data;
        this.open1 = true;
        this.title1= "印章管理详情";
      });*/
      const id = row.id;
      this.$router.push({ path:"/yewu/drmanadetail", query: {id}});
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateMana(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addMana(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const idNumbers = row.idNumber || this.idNumbers;
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除身份证号为"' + idNumbers + '"的数据项？').then(function() {
        return delMana(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    addQuestion() {
      this.$router.push({
        path: "/yewu/drinfo",
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('dr/mana/export', {
        ...this.queryParams
      }, `mana_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
